//
//  GKZYRegsiterView.m
//  GKZYAid
//
//  Created by lanou3g on 16/3/8.
//  Copyright © 2016年 GKZYAid. All rights reserved.
//

#import "GKZYRegsiterView.h"
#define KWidth self.frame.size.width
#define KHeight self.frame.size.height
#define KH KHeight *0.05

@implementation GKZYRegsiterView

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        [self addViews];
    }
    
    return self;
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    
    [self.textfiledID resignFirstResponder];
}


- (void)addViews{
    
    self.labelText = [[UILabel alloc]initWithFrame:CGRectMake(0, KHeight * 0.55, KWidth, KHeight * 0.05)];
    self.labelText.text = @"我们是孩子的灯塔";
    self.labelText.textAlignment = NSTextAlignmentCenter;
    self.labelText.backgroundColor = [UIColor orangeColor];
    self.labelText.font = [UIFont systemFontOfSize:19];
    [self addSubview:self.labelText];
    
    
    self.labelUserID = [[UILabel alloc]initWithFrame:CGRectMake(KWidth * 0.16,KHeight * 0.2, KWidth * 0.18, KH)];
    self.labelUserID.backgroundColor = [UIColor orangeColor];
    self.labelUserID.text = @"用户ID:";
    self.labelUserID.userInteractionEnabled = YES;
    [self addSubview:self.labelUserID];
    
    self.textfiledID = [[UITextField alloc]initWithFrame:CGRectMake(KWidth * 0.34 , KHeight * 0.2, KWidth * 0.5, KH)];
    self.textfiledID.placeholder = @"请输入用户ID";
    self.textfiledID.backgroundColor = [UIColor whiteColor];
    self.textfiledID.borderStyle = UITextBorderStyleRoundedRect;
    self.textfiledID.font = [UIFont systemFontOfSize:14];
    [self addSubview:self.textfiledID];
    
    
    self.buttonLanding = [UIButton buttonWithType:(UIButtonTypeCustom)];
    self.buttonLanding.frame = CGRectMake(KWidth * 0.4, KHeight * 0.3, KWidth * 0.2, KWidth * 0.2);
    self.buttonLanding.backgroundColor = [UIColor orangeColor];
    [self.buttonLanding setTitle:@"登陆" forState:UIControlStateNormal];
    self.buttonLanding.layer.cornerRadius = self.buttonLanding.frame.size.width/2;
    [self addSubview:self.buttonLanding];
    
    NSArray *array = @[@"1.jpg",@"2.jpg",@"3.jpg",@"5.jpg",@"6.jpg",@"7.jpg"];
    SDCycleScrollView *cycleScrollView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(0, KHeight * 0.6, KWidth, KHeight * 0.4) imageNamesGroup:array];
    cycleScrollView.autoScrollTimeInterval = 2;
    cycleScrollView.backgroundColor = [UIColor redColor];
    [self addSubview:cycleScrollView];
    
}

/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */

@end
